--- Test properties of the 'Exit' module
module tests.qc.Exit where

import System.Exit as E
import Test.QuickCheck

o_ExitCodeSuccessEqOrd = once ( ExitSuccess == ExitSuccess &&
    not ( ExitSuccess < ExitSuccess ) )

exitCodes :: Gen Int
exitCodes = choose (1,99)

p_ExitCodeFailureEqOrd = forAll exitCodes (\x ->
    ExitFailure x == ExitFailure x &&
    ExitFailure x < ExitFailure (x + 1))

o_ExitCodeSuccessFailure = once ( ExitSuccess /= ExitFailure 1 &&
    ExitSuccess < ExitFailure 1 )
